<template>
       <el-radio-group v-model="radio1" size="medium" class="chenggroup" >
                <el-radio-button class="chengradio" label="FR-4" ></el-radio-button>
                <el-radio-button class="chengradio" label="22F"></el-radio-button>
                <el-radio-button class="chengradio" label="CEM-1"></el-radio-button>
                <el-radio-button class="chengradio" label="铝基板"></el-radio-button>
                <el-radio-button class="chengradio" label="FR-1"></el-radio-button>
        </el-radio-group>
</template>

<script>

 

export default {
     data() {
       return {
        i:this.$myF.arrIndex(this.$store.state.data.pcbInfo,"板材类型：")
       };
     },
     computed:{
        radio1:{
                get: function () {
        return this.$store.state.data.pcbInfo[this.i].pcbpara;
      },
               set: function (v) {
        this.$store.state.data.pcbInfo[this.i].pcbpara = v;
      },

        }

    },

    watch:{
        radio1:function(val){
            let i=this.$myF.arrIndex(this.$store.state.data.pcbInfo,"铜箔厚度：")
              if(val=="22F" || val=="CEM-1" ){
                 this.$store.state.data.pcbInfo[i].pcbpara="18um"
             }else if(val=="FR-1"){
                this.$store.state.data.pcbInfo[i].pcbpara="25um"
             }
             else{
                 this.$store.state.data.pcbInfo[i].pcbpara="36um"
             }
        }

    }



}
</script>

<style>

@import "./css/radio.css";

</style>